package cn.jingyuan.fox.support.web.apis.web;

import cn.jingyuan.fox.user.service.HelloService;
import cn.jingyuan.fox.user.web.apis.web.model.SayHelloReq;
import cn.jingyuan.fox.user.web.apis.web.model.SayHelloRsp;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class HelloController {

    private final HelloService helloService;

    public HelloController(HelloService helloService) {
        this.helloService = helloService;
    }

    @GetMapping(path = "/say-hello")
    public SayHelloRsp sayHello(SayHelloReq req) {
        log.info("req = {}", req);

        // do something
        // SayHelloReqDto reqDto = new SayHelloReqDto();
        // SayHelloRspDto rspDto = helloService.sayHello(reqDto);

        SayHelloRsp rsp = new SayHelloRsp();

        return rsp;
    }

}
